home *** CD-ROM | disk | FTP | other *** search
- aPLib Ada binding v. 11.II.1998
- --------------------------------
-
- Files
- -----
-
- aplibada.doc this file
- aplib.ads package specification for aPLib Ada binding
- aplib.adb package body for aPLib Ada binding
- apacdemo.adb demo
- makeit.bat make command for demo (with gnat compiler)
-
-
- Usage
- -----
-
- The package is generic, so you can use it
- for any data - see specification, aplib.ads .
-
- For the packed data type, it's simpler
- to use an array of bytes, so you can easily calibrate
- the safe size of packed data (see aplib.doc).
- If your data is named blabla, its size will be
-
- blabla'size in bits
- blabla'size/8 in bytes
-
- so the safe size in bytes for packed data will be
-
- (((blabla'size/8) * 9) / 8) + 16
-
- the packed data will ideally be an
- array(1..(((blabla'size/8) * 9) / 8) + 16) of byte
-
- Read apacdemo.adb to see an example how to implement it.
-
-
- Binding the aPLib library
- -------------------------
-
- For GNAT compiler, make your program (here the demo) with the command
-
- gnatmake apacdemo.adb -largs aplib.a
-
- (add usual options if needed).
- Ignore the warnings. I was obliged to cheat about the in/out nature of
- parameters in the C functions.
-
- Portability: full, provided the aPLib exists on your platform,
- of course !
-
- How to run the demo
- -------------------
-
- The command
-
- apacdemo a.x b.y c.z
-
- will pack the contents of files a.x b.y c.z into
- packed.000, packed.001, packed.002 and unpack into
- pack_unp.000, pack_unp.001, pack_unp.002 .
-
- Typical output:
-
- D:\APACKADA>apacdemo frog.bmp
- [==================|................................]
- File: frog.bmp
- Unpacked size: 66614
- Packed size: 24865
- Compression ratio: 37%
-
-
- How to get a free compiler
- --------------------------
-
- Search the net for the GNU one, named GNAT. Full Ada95 implementation
- with libraries & sources.
-
- http://ftpsearch.lycos.com/cgi-bin/search?form=normal&query=gnat
-
- Current version is GNAT 3.11
-
- The DOS version is in a distribution named EZ2LOAD.
- Main:
- ftp://ftp.gwu.edu/pub/ada/ez2load/
- Search:
- http://ftpsearch.lycos.com/cgi-bin/search?form=normal&query=ez2load
-
- Current DOS version is GNAT 3.10, using DJGPP 2.01 as back-end.
- A GNAT 3.11, using DJGPP 2.02, is currently being tested.
-
-
- Questions
- ---------
-
- Send them to following e-mail: Gautier.deMontmollin@Maths.UniNe.CH
-